﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DbToDocument.Core.LiteDB
{
    /// <summary>
    /// 表格名称
    /// </summary>
    public class TableName
    { 
        /// <summary>
        /// 菜单表
        /// </summary>
        public static readonly string Menu = "Menu";
        /// <summary>
        /// 数据库连接配置表
        /// </summary>
        public static readonly string DbConConfig = "DbConConfig";
    }

    /// <summary>
    /// 系统菜单表
    /// </summary>
    public class Menu
    {
        /// <summary>
        /// 主键ID
        /// </summary>
        public long Id { get; set; }
        /// <summary>
        /// 菜单代码
        /// </summary>
        public string Code { get; set; }
        /// <summary>
        /// 菜单名称
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 上级菜单名称
        /// </summary>
        public long ParentId { get; set; }
        /// <summary>
        /// 菜单图标
        /// </summary>
        public string Icon { get; set; }
        /// <summary>
        /// 路径地址
        /// </summary>
        public string Url { get; set; }
    }

    /// <summary>
    /// 数据库连接信息
    /// </summary>
    public class DbConConfig
    {
        public long? Id { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; } 
        /// <summary>
        /// 数据类型
        /// </summary>
        public string DbType { get; set; }
        /// <summary>
        /// 数据库连接字符串
        /// </summary>
        public string ConnectString { get; set; }
    }
}
